from fastapi import APIRouter, Request
from fastapi.responses import HTMLResponse, JSONResponse

router = APIRouter()

# 你的第一个路由 - 返回 "Hello, World"
@router.get("/", response_class=JSONResponse)
async def root():
    return {"message": "Hello, World! 🚀", "status": "success"}

@router.get("/health")
async def health_check():
    """健康检查端点"""
    return {"status": "healthy", "service": "tech-hub-portal"}

@router.get("/info")
async def project_info():
    """项目信息"""
    return {
        "name": "Tech Hub Portal",
        "version": "1.0.0",
        "description": "个人技术门户与量化中枢",
        "modules": ["主站", "量化作战室", "工具工厂", "技术博客"]
    }